home *** CD-ROM | disk | FTP | other *** search
- function walk()
- {
- var _loc1_ = this;
- var _loc2_ = _root;
- _loc2_.sSound2.stop();
- _loc2_.sSound1.start(0,1000);
- _loc2_.comboNum = 0;
- _loc2_.point = 0;
- speed = 2;
- gotoAndStop(2);
- _loc1_.onEnterFrame = function()
- {
- var _loc1_ = this;
- var _loc2_ = _root;
- if(!(Math.abs(_loc2_._ymouse - (_Y - 32)) < 3 && Math.abs(_loc2_._xmouse - _X) < 3))
- {
- _loc1_.swapDepths(_loc1_._y * 100 + id);
- radian = Math.atan2(_loc2_._ymouse - (_Y - 32),_loc2_._xmouse - _X);
- _loc1_._x += speed * Math.cos(radian);
- _loc1_._y += speed * Math.sin(radian);
- if(_loc1_._y < 110)
- {
- _loc1_._y = 110;
- }
- }
- };
- _loc1_.onMouseDown = function()
- {
- if(_root.comboNum >= 5)
- {
- this.oyaji();
- }
- };
- }
- function oyaji()
- {
- var _loc1_ = this;
- _root.sSound1.stop();
- _loc1_.gotoAndStop(3);
- timeOut = 5000;
- startTime = getTimer();
- _loc1_.onEnterFrame = function()
- {
- if(getTimer() > startTime + timeOut)
- {
- this.p.rev();
- delete this.onEnterFrame;
- }
- };
- delete _loc1_.onMouseDown;
- }
- id = 1;
- this.swapDepths(this._y * 100 + id);
- stop();
-